3.955 \(\int \frac{A+B x}{x \sqrt{a+b x+c x^2}} \, dx\)

Optimal. Leaf size=77 \[ \frac{B \tanh ^{-1}\left (\frac{b+2 c x}{2 \sqrt{c} \sqrt{a+b x+c x^2}}\right )}{\sqrt{c}}-\frac{A \tanh ^{-1}\left (\frac{2 a+b x}{2 \sqrt{a} \sqrt{a+b x+c x^2}}\right )}{\sqrt{a}} \]

[Out]

-((A*ArcTanh[(2*a + b*x)/(2*Sqrt[a]*Sqrt[a + b*x + c*x^2])])/Sqrt[a]) + (B*ArcTa
nh[(b + 2*c*x)/(2*Sqrt[c]*Sqrt[a + b*x + c*x^2])])/Sqrt[c]

_______________________________________________________________________________________

Rubi [A]  time = 0.140565, antiderivative size = 77, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.174 \[ \frac{B \tanh ^{-1}\left (\frac{b+2 c x}{2 \sqrt{c} \sqrt{a+b x+c x^2}}\right )}{\sqrt{c}}-\frac{A \tanh ^{-1}\left (\frac{2 a+b x}{2 \sqrt{a} \sqrt{a+b x+c x^2}}\right )}{\sqrt{a}} \]

Antiderivative was successfully verified.

[In]  Int[(A + B*x)/(x*Sqrt[a + b*x + c*x^2]),x]

[Out]

-((A*ArcTanh[(2*a + b*x)/(2*Sqrt[a]*Sqrt[a + b*x + c*x^2])])/Sqrt[a]) + (B*ArcTa
nh[(b + 2*c*x)/(2*Sqrt[c]*Sqrt[a + b*x + c*x^2])])/Sqrt[c]

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 15.4184, size = 70, normalized size = 0.91 \[ - \frac{A \operatorname{atanh}{\left (\frac{2 a + b x}{2 \sqrt{a} \sqrt{a + b x + c x^{2}}} \right )}}{\sqrt{a}} + \frac{B \operatorname{atanh}{\left (\frac{b + 2 c x}{2 \sqrt{c} \sqrt{a + b x + c x^{2}}} \right )}}{\sqrt{c}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((B*x+A)/x/(c*x**2+b*x+a)**(1/2),x)

[Out]

-A*atanh((2*a + b*x)/(2*sqrt(a)*sqrt(a + b*x + c*x**2)))/sqrt(a) + B*atanh((b +
2*c*x)/(2*sqrt(c)*sqrt(a + b*x + c*x**2)))/sqrt(c)

_______________________________________________________________________________________

Mathematica [A]  time = 0.105801, size = 80, normalized size = 1.04 \[ -\frac{A \log \left (2 \sqrt{a} \sqrt{a+x (b+c x)}+2 a+b x\right )}{\sqrt{a}}+\frac{A \log (x)}{\sqrt{a}}+\frac{B \log \left (2 \sqrt{c} \sqrt{a+x (b+c x)}+b+2 c x\right )}{\sqrt{c}} \]

Antiderivative was successfully verified.

[In]  Integrate[(A + B*x)/(x*Sqrt[a + b*x + c*x^2]),x]

[Out]

(A*Log[x])/Sqrt[a] - (A*Log[2*a + b*x + 2*Sqrt[a]*Sqrt[a + x*(b + c*x)]])/Sqrt[a
] + (B*Log[b + 2*c*x + 2*Sqrt[c]*Sqrt[a + x*(b + c*x)]])/Sqrt[c]

_______________________________________________________________________________________

Maple [A]  time = 0.01, size = 67, normalized size = 0.9 \[{B\ln \left ({1 \left ({\frac{b}{2}}+cx \right ){\frac{1}{\sqrt{c}}}}+\sqrt{c{x}^{2}+bx+a} \right ){\frac{1}{\sqrt{c}}}}-{A\ln \left ({\frac{1}{x} \left ( 2\,a+bx+2\,\sqrt{a}\sqrt{c{x}^{2}+bx+a} \right ) } \right ){\frac{1}{\sqrt{a}}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((B*x+A)/x/(c*x^2+b*x+a)^(1/2),x)

[Out]

B*ln((1/2*b+c*x)/c^(1/2)+(c*x^2+b*x+a)^(1/2))/c^(1/2)-A/a^(1/2)*ln((2*a+b*x+2*a^
(1/2)*(c*x^2+b*x+a)^(1/2))/x)

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x + A)/(sqrt(c*x^2 + b*x + a)*x),x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [A]  time = 0.380747, size = 1, normalized size = 0.01 \[ \left [\frac{B \sqrt{a} \log \left (-4 \,{\left (2 \, c^{2} x + b c\right )} \sqrt{c x^{2} + b x + a} -{\left (8 \, c^{2} x^{2} + 8 \, b c x + b^{2} + 4 \, a c\right )} \sqrt{c}\right ) + A \sqrt{c} \log \left (\frac{4 \,{\left (a b x + 2 \, a^{2}\right )} \sqrt{c x^{2} + b x + a} -{\left (8 \, a b x +{\left (b^{2} + 4 \, a c\right )} x^{2} + 8 \, a^{2}\right )} \sqrt{a}}{x^{2}}\right )}{2 \, \sqrt{a} \sqrt{c}}, \frac{2 \, B \sqrt{a} \arctan \left (\frac{{\left (2 \, c x + b\right )} \sqrt{-c}}{2 \, \sqrt{c x^{2} + b x + a} c}\right ) + A \sqrt{-c} \log \left (\frac{4 \,{\left (a b x + 2 \, a^{2}\right )} \sqrt{c x^{2} + b x + a} -{\left (8 \, a b x +{\left (b^{2} + 4 \, a c\right )} x^{2} + 8 \, a^{2}\right )} \sqrt{a}}{x^{2}}\right )}{2 \, \sqrt{a} \sqrt{-c}}, -\frac{2 \, A \sqrt{c} \arctan \left (\frac{{\left (b x + 2 \, a\right )} \sqrt{-a}}{2 \, \sqrt{c x^{2} + b x + a} a}\right ) - B \sqrt{-a} \log \left (-4 \,{\left (2 \, c^{2} x + b c\right )} \sqrt{c x^{2} + b x + a} -{\left (8 \, c^{2} x^{2} + 8 \, b c x + b^{2} + 4 \, a c\right )} \sqrt{c}\right )}{2 \, \sqrt{-a} \sqrt{c}}, -\frac{A \sqrt{-c} \arctan \left (\frac{{\left (b x + 2 \, a\right )} \sqrt{-a}}{2 \, \sqrt{c x^{2} + b x + a} a}\right ) - B \sqrt{-a} \arctan \left (\frac{{\left (2 \, c x + b\right )} \sqrt{-c}}{2 \, \sqrt{c x^{2} + b x + a} c}\right )}{\sqrt{-a} \sqrt{-c}}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x + A)/(sqrt(c*x^2 + b*x + a)*x),x, algorithm="fricas")

[Out]

[1/2*(B*sqrt(a)*log(-4*(2*c^2*x + b*c)*sqrt(c*x^2 + b*x + a) - (8*c^2*x^2 + 8*b*
c*x + b^2 + 4*a*c)*sqrt(c)) + A*sqrt(c)*log((4*(a*b*x + 2*a^2)*sqrt(c*x^2 + b*x
+ a) - (8*a*b*x + (b^2 + 4*a*c)*x^2 + 8*a^2)*sqrt(a))/x^2))/(sqrt(a)*sqrt(c)), 1
/2*(2*B*sqrt(a)*arctan(1/2*(2*c*x + b)*sqrt(-c)/(sqrt(c*x^2 + b*x + a)*c)) + A*s
qrt(-c)*log((4*(a*b*x + 2*a^2)*sqrt(c*x^2 + b*x + a) - (8*a*b*x + (b^2 + 4*a*c)*
x^2 + 8*a^2)*sqrt(a))/x^2))/(sqrt(a)*sqrt(-c)), -1/2*(2*A*sqrt(c)*arctan(1/2*(b*
x + 2*a)*sqrt(-a)/(sqrt(c*x^2 + b*x + a)*a)) - B*sqrt(-a)*log(-4*(2*c^2*x + b*c)
*sqrt(c*x^2 + b*x + a) - (8*c^2*x^2 + 8*b*c*x + b^2 + 4*a*c)*sqrt(c)))/(sqrt(-a)
*sqrt(c)), -(A*sqrt(-c)*arctan(1/2*(b*x + 2*a)*sqrt(-a)/(sqrt(c*x^2 + b*x + a)*a
)) - B*sqrt(-a)*arctan(1/2*(2*c*x + b)*sqrt(-c)/(sqrt(c*x^2 + b*x + a)*c)))/(sqr
t(-a)*sqrt(-c))]

_______________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{A + B x}{x \sqrt{a + b x + c x^{2}}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x+A)/x/(c*x**2+b*x+a)**(1/2),x)

[Out]

Integral((A + B*x)/(x*sqrt(a + b*x + c*x**2)), x)

_______________________________________________________________________________________

GIAC/XCAS [F(-2)]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: TypeError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x + A)/(sqrt(c*x^2 + b*x + a)*x),x, algorithm="giac")

[Out]

Exception raised: TypeError